home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 7 / BBS in a Box - Macintosh - Volume VII (BBS in a Box) (January 1993).iso / Files / Hyper / Rinaldi / HC 1.2 & 2.0 / SetFileFlag 1.2.cpt / SetFileFlag 1.2 / card_3055.txt < prev    next >
Text File  |  1991-12-25  |  5KB  |  224 lines

  1. -- card: 3055 from stack: in.2
  2. -- bmap block id: 3273
  3. -- flags: 0000
  4. -- background id: 2661
  5. -- name: 
  6.  
  7.  
  8. -- part 1 (field)
  9. -- low flags: 01
  10. -- high flags: 0007
  11. -- rect: left=69 top=68 right=252 bottom=434
  12. -- title width / last selected line: 0
  13. -- icon id / first selected line: 0 / 0
  14. -- text alignment: 0
  15. -- font id: 3
  16. -- text size: 9
  17. -- style flags: 0
  18. -- line height: 12
  19. -- part name: 
  20.  
  21.  
  22. -- part 25 (button)
  23. -- low flags: 00
  24. -- high flags: A003
  25. -- rect: left=201 top=278 right=316 bottom=346
  26. -- title width / last selected line: 0
  27. -- icon id / first selected line: 0 / 0
  28. -- text alignment: 1
  29. -- font id: 0
  30. -- text size: 12
  31. -- style flags: 0
  32. -- line height: 16
  33. -- part name: SetFileFlag
  34. ----- HyperTalk script -----
  35. on mouseUp
  36.   get FilePath(empty,"File to change :")
  37.   if it is empty then exit mouseUp
  38.   put it into TheFile
  39.   ask "Name of the flag :"
  40.   if it is empty then exit mouseUp
  41.   put it into TheFlag
  42.   answer "Set ‚Äú" & theFlag & "‚Äù to :" with "Cancel" or "False" or "True"
  43.   if it is "Cancel" then exit mouseUp
  44.   SetFileFlag TheFile,TheFlag,it
  45.   if The Result ‚↠empty
  46.   then answer the Result
  47. else answer TheFlag && "flag is now set to" && it
  48. end mouseUp
  49.  
  50.  
  51.  
  52. -- part 29 (field)
  53. -- low flags: 81
  54. -- high flags: 6004
  55. -- rect: left=165 top=24 right=289 bottom=337
  56. -- title width / last selected line: 0
  57. -- icon id / first selected line: 0 / 0
  58. -- text alignment: 0
  59. -- font id: 3
  60. -- text size: 9
  61. -- style flags: 256
  62. -- line height: 11
  63. -- part name: 
  64. ----- HyperTalk script -----
  65. on mouseUp
  66.   hide cd fld 2
  67.   hide cd fld 3
  68. end mouseUp
  69.  
  70.  
  71. -- part 30 (field)
  72. -- low flags: 80
  73. -- high flags: 6000
  74. -- rect: left=258 top=24 right=289 bottom=335
  75. -- title width / last selected line: 0
  76. -- icon id / first selected line: 0 / 0
  77. -- text alignment: 0
  78. -- font id: 3
  79. -- text size: 9
  80. -- style flags: 0
  81. -- line height: 11
  82. -- part name: 
  83. ----- HyperTalk script -----
  84. on mouseUp
  85.   hide cd fld 2
  86.   hide cd fld 3
  87. end mouseUp
  88.  
  89.  
  90. -- part contents for card part 1
  91. ----- text -----
  92.  
  93.                                              SetFileFlag 1.2
  94.  
  95.                                          by Fr√©d√©ric RINALDI
  96.  
  97.  
  98. DESCRIPTION
  99. ------------
  100.   SetFileFlag is an XCMD allowing to change the value of the authorized Finder flags of a file.
  101.  
  102.  
  103. SYNTAX
  104. -------
  105.       SetFileFlag <file path or name>,<flag name>[,<flag state>]
  106.                         [,"DontResolveAlias"]
  107.  
  108.  
  109. PARAMETERS
  110. ------------
  111.  
  112.    <file path or name> can be a single name or whole pathname. If just a single name is supplied, the file is assumed to be in the same folder than the current stack.
  113.  
  114.    <flag name> must be one of the following string values (accepted System 7.0 values are enclosed in brackets) :
  115.             busy (hasCustomIcon), noCopy (isStationery), hasBundle,
  116.             System  (nameLocked), invisible (isInvisible)
  117.  
  118.    <flag state> is a boolean defining the desired state of the choosen flag. Default value is TRUE.
  119.  
  120.    "dontResolveAlias" allows to deal with an alias file itself (System 7.0 only) rather than with the file pointed by it.
  121.  
  122.    Using "!", "?" or "=" as first parameter will return an online help (resp. copyright, syntax and output).
  123.  
  124.  
  125. USING
  126. -----
  127.    If an error occurs, the XCMD will return in the Result :
  128.  
  129.      "Error : Not a file"
  130.      "Error : Not a folder"
  131.      "Error : Alias file not supported"
  132.      "Error : Volume not found"
  133.      "Error : Bad Name"
  134.      "Error : File not found"
  135.      "Error : Folder not found"
  136.      "Error : File is busy"
  137.      "Error : I/O Error"
  138.      "Error : Folder is full"
  139.      "Error : Volume is locked"
  140.      "Error : No resource fork"
  141.      "Error : Duplicate file/folder name"
  142.      "Error : Moving whole volume not allowed"
  143.      "Error : Not an AppleShare volume"
  144.      "Error : AppleShare insufficient privileges"
  145.      "Error : Missing or empty parameter(s)"
  146.      "Error : Bad param #X"
  147.      "Error : Bad or unauthorized flag name"
  148.  
  149.  
  150. HISTORY
  151. --------
  152. 1.2 :                                                                                          12/25/91
  153. ‚Ä¢ Fixed alias file bug under System 7.0.1
  154.  
  155. 1.1 :                                                                                          08/04/91
  156. ‚Ä¢ Added support for System 7.0 alias files
  157. ‚Ä¢ General enhancement of the code
  158. ‚Ä¢ Added "DontResolveAlias" parameter
  159. ‚Ä¢ Added "=" param for online help
  160.  
  161.  
  162. This stack uses FilePath  XFCN (¬© 1898, 1990 Apple Computer, Inc.)
  163. ---------------------------------------------------------------------
  164.  
  165. This (these) external(s) is (are) FreeWare,allowing unlimited use in any non-commercial stack. You just need in this case to mention the author's name and copyright in your stack.
  166. Any commercial use must be licensed and aknowledged by the author.
  167.  
  168.                                 ¬© Frederic RINALDI 1990,1991
  169.  
  170. AppleLink: RINALDI1        CalvaCom : FR10        Compuserve : 71170,2111
  171.  
  172. -- part contents for card part 29
  173. ----- text -----
  174. type
  175. creator
  176. création
  177. modification
  178. taille
  179. data fork
  180. resource fork
  181. onDesk
  182. bFOwnAppl
  183. réservé
  184. réservé
  185. bfNever
  186. bfAlways
  187. shareable
  188. réservé
  189. Inited
  190. Changed
  191. Busy
  192. NoCopy
  193. System
  194. hasBundle
  195. Invisible
  196. Locked
  197.  
  198.  
  199.  
  200. -- part contents for card part 30
  201. ----- text -----
  202. TEXT
  203. MPS 
  204. 14/03/90
  205. 13/03/90
  206. 8586
  207. 7090
  208. 1496
  209. false
  210. false
  211. false
  212. false
  213. false
  214. false
  215. false
  216. false
  217. true
  218. false
  219. false
  220. false
  221. false
  222. false
  223. false
  224. false